package com.xubeizhi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xubeizhi.entity.Comment;
import com.xubeizhi.vo.CommentVO;
import com.xubeizhi.vo.ReplyCountVO;
import com.xubeizhi.vo.ReplyVO;
import com.xubeizhi.vo.SystemCommentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 博客评论表 Mapper接口
 * @author mi
 * @create 2023/3/2 13:24
 */
@Repository
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    List<CommentVO> listComments(@Param("page") int page,@Param("size")int size,@Param("articleId")Long articleId);

    List<ReplyVO> listReplies(Integer id);

    ReplyCountVO listReplyCountByCommentId(Integer id);

    Page<SystemCommentVO> selectPageList(@Param("page")Page<Object> objectPage,@Param("keywords")String keywords);
}
